{% extends 'TopxiaAdminBundle::layout.html.twig' %}

{% set menu = 'admin_cloud_video_overview' %}
{% set script_controller = 'setting/cloud-video-overview.js' %}

{% set script_arguments = {spaceItems: spaceItems, flowItems: flowItems}  %}
{#{% block tabs %}{% include 'PermissionBundle:Templates:tabs.html.twig' %}{% endblock %}#}

{% block page_title %}
  {% if setting('cloud_status.locked') == true %}
    <div class="alert alert-warning" role="alert">{{'您的教育云服务已被锁定，请联系客服人员：'|trans}}4008041114。</div>
    {{ currentMenu.code|parent_permission.name|trans }}
  {% elseif video.status|default() == 'stoped' %}
    <div class="alert alert-warning" role="alert">{{'
    您的云视频服务已被暂停，不能使用，请联系客服人员：'|trans}}4008041114。</div>
    {{ currentMenu.code|parent_permission.name|trans }}
  {% else %}
    {{ parent() }}
  {% endif %}
{% endblock %}

{% block main %}
{% if video.isBuy == true %}
  {% include 'TopxiaAdminBundle:EduCloud/Video:video-show.html.twig' %}
{% else %}
  {% include 'TopxiaAdminBundle:EduCloud/Video:video-buy.html.twig' %}
{% endif %}

{% if yearPackage.isBuy == true %}
  {% include 'TopxiaAdminBundle:EduCloud/Video:flow-show.html.twig' %}
{% else %}
  {% include 'TopxiaAdminBundle:EduCloud/Video:flow-buy.html.twig' %}
{% endif %}

<div class="panel panel-default panel-chart">
    <div class="panel-heading">存储空间使用趋势<span class="text-muted">（最近7个月）</span><a class="pull-right" href="{{path('admin_cloud_video_detail')}}" target="_blank">更多&ensp;></a></div>
    <div class="panel-body">
      <div id="spaceItemChart" style="width: 100%;height:400px;"></div>
    </div>
</div>

<div class="panel panel-default panel-chart">
  <div class="panel-heading">
    流量使用趋势
    <span class="text-muted">（最近7个月）</span>
    <a class="pull-right" href="{{path('admin_cloud_video_detail')}}" target="_blank">更多&ensp;></a>
  </div>
  <div class="panel-body">
    <div id="flowItemChart" style="width: 100%;height:400px;"></div>
  </div>
</div>

{% endblock %}